<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:c="http://java.sun.com/jsp/jstl/core" >
 <head>
 </head>    
  <ui:composition template="/templates/default/template.xhtml">
    	<ui:define name="body"> 
 			<h:panelGrid columns="1" style="margin-left:5px;width:100%">	
 				<!--  tieu de -->
	 			<h:panelGrid columns="3" styleClass="columPanelbaritemTitle">
					<h:graphicImage value="/templates/default/images/left-heading_01.jpg" style="margin-left:-4px;margin-bottom:0px"></h:graphicImage>
			  		<h:outputText value="Gửi yêu cầu" styleClass="panelbaritemTitle"></h:outputText>
					<h:graphicImage value="/templates/default/images/left-heading_03.jpg"></h:graphicImage>
		  		</h:panelGrid>
		  			<!-- ket thuc tieu de -->
					<!-- phan noi dung phia duoi -->
		  		<h:panelGrid columns="1" styleClass="panelGridBody">
				<h:form>
				<rich:panel style="background:#FFFFFF">
			  		<h:panelGrid columns="2">
			  			<h:outputText></h:outputText>
						<h:outputText id="idError" value="#{guiYeuCau.error}" style=" color: red;"></h:outputText>
						<h:outputText  value="Mã đoàn  (*):" style="margin-left:50px;" styleClass="inputText" ></h:outputText>
						<h:inputText value="#{guiYeuCau.maDoan}" styleClass="Input" id="text">
						</h:inputText>
						<h:panelGrid columns="1">
						 <rich:suggestionbox  id="suggestionBoxId" for="text" tokens=",["
			                rules="#{suggestionBoxSua.rules}"
			                suggestionAction="#{suggestionBoxSua.autocomplete}" var="result"
			                fetchValue="#{result.text}" rows="#{suggestionBoxSua.intRows}"
			                first="#{suggestionBoxSua.intFirst}"
			                minChars="#{suggestionBoxSua.minchars}"
			                shadowOpacity="#{suggestionBoxSua.shadowOpacity}"
			                border="#{suggestionBoxSua.border}" width="#{suggestionBoxSua.width}"
			                height="#{suggestionBoxSua.height}"
			                shadowDepth="#{suggestionBoxSua.shadowDepth}"
			                cellpadding="#{suggestionBoxSua.cellpadding}">
			            
		                <h:column styleClass="inputText">
		                    <h:outputText value="#{result.text}" styleClass="inputText"/>
		                </h:column>
                  </rich:suggestionbox>
                   </h:panelGrid>
					</h:panelGrid>
			  		<h:panelGrid columns="2">
			  			<h:outputText  value="Lý do (*):" style="margin-left:50px;" styleClass="inputText" ></h:outputText>
		    			<h:inputTextarea value="#{guiYeuCau.lydo}" styleClass="inputText" style="margin-left:5px;"></h:inputTextarea>
		    			<h:outputText  value="Thao tác(*) :"  style="margin-left:50px;" styleClass="inputText" ></h:outputText>
					 <!-- Loi tại day -->
		    		<h:selectManyCheckbox value="#{guiYeuCau.thaotac}" style="margin-left:5px;">
		    			<f:selectItems value="#{guiYeuCau.selectItem}"/>
		    		</h:selectManyCheckbox> 
			  		<!-- ket thuc loi -->
			  		</h:panelGrid>
			  		<!-- action -->	
			  	 <h:panelGrid columns="3" style="margin-left:150px;margin-top:10px">
			    	<a4j:commandButton value="Gửi" styleClass="Button" action="#{guiYeuCau.send}" reRender="idError" ></a4j:commandButton>
			        <a4j:commandButton  action="#{guiYeuCau.reset}" value="Reset" styleClass="Button" ></a4j:commandButton>
			      </h:panelGrid>
		  		</rich:panel>
		  		  <!-- ket thuc action -->
				</h:form>
			
			<!-- Bat dau table -->
			<!-- 	<rich:panel style="background:none"> -->
			<h:form>
			
					<h:dataTable id="list" value="#{guiYeuCau.listTable}" var="T" 
								columnClasses="column" headerClass="TableHeader" rowClasses="ROW1,ROW2" footerClass="TableFooter" 
					       style="width:100%; margin-left:0px;margin-top: 10px" cellspacing="1px;" rows="20">
						<h:column>
							<f:facet name="header">
								<h:outputText value="STT"></h:outputText>
							</f:facet>
							<h:outputText value="#{T.stt}"></h:outputText>
							<f:facet name="footer">
								<rich:spacer></rich:spacer>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Mã đoàn"></h:outputText>
							</f:facet>
							<h:outputText value="#{T.soHC_Madoan}"></h:outputText>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Lý do"></h:outputText>
							</f:facet>
							<h:outputText value="#{T.lydo}"></h:outputText>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Ngày yêu cầu"></h:outputText>
							</f:facet>
							<h:outputText value="#{T.ngayYeuCau}"></h:outputText>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Duyệt" ></h:outputText>
							</f:facet>
							<h:outputText value="#{T.daDuyet}"></h:outputText>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Khóa" ></h:outputText>
							</f:facet>
							<h:outputText value="#{T.khoa}"></h:outputText>
						</h:column>
						<!-- 
						<h:column>
							<f:facet name="header">
								<h:outputText value="Ngày duyệt"></h:outputText>
							</f:facet>
							<h:outputText value="#{T.ngayDuyet}"></h:outputText>
						</h:column> 
						 -->
						<h:column>
							<f:facet name="header">
								<h:outputText value="Thao tác"></h:outputText>
							</f:facet>
							<h:outputText value="#{T.thaoTac}"></h:outputText>
						</h:column>
						
						<h:column>
							<f:facet name="header">
								<h:outputText value="Xóa"></h:outputText>
							</f:facet>
							<a4j:commandLink action="#{guiYeuCau.delete}"  onclick="if(!confirm('Bạn muốn xóa yêu cầu này?')) 
							 								{return false;}" reRender="idError">
							 	<h:graphicImage value="/qldoanra/func01/images/icoDelete.gif">
							 	</h:graphicImage>
							 	<f:param value="#{T.soHC_Madoan}" name="lnkMaDoan"/>							 
							 </a4j:commandLink>
						</h:column>
					</h:dataTable>
						<!-- phan trang -->
						<rich:datascroller align="right"  for="list" maxPages="5" />
						<!-- ket thuc phan trang -->
				</h:form>
				<!-- </rich:panel> -->
				<!--  Ket thuc table -->
			
			</h:panelGrid>	
			</h:panelGrid>  
</ui:define>
</ui:composition>			
      
 </html>     